home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / KEYBOARD.ZIP / keyboard.pov < prev    next >
Encoding:
Text File  |  1997-05-20  |  2.3 KB  |  82 lines

  1. // Persistence of Vision Ray Tracer Scene Description File
  2. // File: keyboard.pov
  3. // Vers: 3.01 Watcom Win32
  4. // Desc: Computer Keyboard
  5. // Date: May 20, 1997
  6. // Auth: Sonya Roberts
  7. // Note: To use this file, just #include it in your scene then use object{Keyboard}
  8. //       anyplace you desire.
  9.  
  10. #declare Keyboard=
  11. object {
  12.     union {
  13.         union {
  14.             difference {
  15.                 union {
  16.                     box {<-.75,0,-.25>,<.75,.1,.25>}        // Basic form of keyboard
  17.                     box {
  18.                         <-.75,0,-.25>,<.75,.1,.25>
  19.                         rotate x*5.5
  20.                         translate <0,-.025,0>
  21.                     }
  22.                     cylinder {                    // Round off front edge of keyboard
  23.                         <-.75,.05,0>,<.75,.05,0>,.05
  24.                         translate <0,0,-.25>
  25.                     }
  26.                     cylinder {                    // Round off back edge of keyboard
  27.                         <-.75,.025,0>,<.75,.025,0>,.075
  28.                         translate <0,0,.25>
  29.                     }
  30.                 }
  31.                 box {<-.74,.01,-.24>,<.74,.11,.24>}            // Hollow it out
  32.                 cylinder {<-.725,.05,-.3>,<.725,.05,-.3>,.005}        // Grooves around edge (seam marks)
  33.                 cylinder {<-.75,.05,-.31>,<-.75,.025,.36>,.0025}
  34.                 cylinder {<.75,.05,-.31>,<.75,.025,.36>,.0025}
  35.             }
  36.             height_field {
  37.                 tga "keyboard.tga"            // Height field of top of keyboard
  38.                 smooth
  39.                 texture {
  40.                     material_map {
  41.                         gif "keycolor.gif"
  42.                         texture {                // Raised Keys
  43.                             pigment {color Wheat*1.25}
  44.                         }
  45.                         texture {                // Lettering
  46.                             pigment {color Black}
  47.                         }
  48.                         texture {                // "Num Lock" Light
  49.                             pigment {color Green}
  50.                             finish {ambient 1}
  51.                         }
  52.                         texture {                // Caps and Scroll Lights (Unlit)
  53.                             pigment {color DarkGreen}
  54.                         }
  55.                         texture {                // Body of Keyboard
  56.                             pigment {color Wheat*1.5}
  57.                         }
  58.                     }
  59.                     rotate x*90
  60.                 }
  61.                 translate <-.5,-.5,-.5>            // translate and scale it to match top of box
  62.                 scale <1.5,.1,.5>
  63.                 translate <0,.1,0>
  64.             }
  65.             translate <0,0,.25>                // Position so origin along front edge
  66.             rotate x*-10                    // Tip slightly towards user
  67.         }
  68.         cone {
  69.             <0,0,0>,.05,<0,.1,0>,.1                // Leg for Keyboard
  70.             scale <1,1,.25>                    // Flatten it front-to-back
  71.             translate <-.65,0,.45>                // Move to back left of keyboard
  72.         }
  73.         cone {
  74.             <0,0,0>,.05,<0,.1,0>,.1                // Leg for Keyboard
  75.             scale <1,1,.25>                    // Flatten it front-to-back
  76.             translate <.65,0,.45>                // Move to back right of keyboard
  77.         }
  78.     pigment {color Wheat*1.5}
  79.     }
  80. }
  81.  
  82.